package com.spzx.product.api;

import com.spzx.common.core.exception.ServiceException;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
//RemoteSkuStockService的降级工厂类
@Component
public class RemoteSkuStockFallbackFactory implements FallbackFactory<RemoteSkuStockService> {
    @Override
    public RemoteSkuStockService create(Throwable cause) {
        //降级策略：直接抛出异常
        throw new ServiceException(cause.getMessage());
    }
}
